package com.cnaaa.pay.util;

import org.apache.commons.lang.time.FastDateFormat;

import java.util.Date;
import java.util.UUID;

/**
 * 2018/10/26 Create by 郭文梁
 * IdentityUtil
 * 唯一标识工具类，提供生成ID的方法
 *
 * @author 郭文梁
 * @date 2018/10/26
 */
public class IdentityUtil {
    private static final FastDateFormat DATEFORMAT = FastDateFormat.getInstance("yyyyMMddHHmmssSSS");

    public static String timeId() {
        return DATEFORMAT.format(new Date());
    }

    public static String randomUUID() {
        return UUID.randomUUID().toString();
    }
}
